$temp = ""
if File.exist? "input"
  infile = File.open("input",'r')
  while line=infile .gets
    $temp <<line
  end
  $temp.swapcase!
  infile.close
  outfile = File.new("output", 'w+')
  outfile.puts "#{$temp}"
  outfile.close
else
  puts "File Not Found"
end
